package com.greateamd.timetableasy.client.domain;


public enum StudyPeriodType {
	MONTH("Mois"),
	TRIMESTER("Trimestre"),
	SEMESTER("Semestre"),
	YEAR("Année"),
	CUSTOM("custom");

	private String text;
	
	private StudyPeriodType(String text) {
		this.text = text;
	}
	
	public void setText(String text) {
		this.text = text;
	}
	
	public String getText() {
		return text;
	}
	
	public static StudyPeriodType getStudyPeriodTypeOf(String value){
		assert(value!=null);
		for(StudyPeriodType e : StudyPeriodType.values()){
			if(value.equals(e.getText()))
				return e;
		}
		return null;
	}
}